interface UpdateProfileAPIData {
  avatar: string
  username: string
  company: string
  company_type: string
  duties: string
}

interface UpdateProfileAPIResData {
  code: number
  data: null
  msg: string
  time: string
}

/**
 * @description 编辑个人信息
 */
export function updateProfileAPI(data: UpdateProfileAPIData, token: string) {
  return httpInstance.post<UpdateProfileAPIResData, UpdateProfileAPIData>(
    '/api/index/updateInfo',
    data,
    { headers: { token } },
  )
}
